package org.hyf.inspur.LessonDesin.clear.count5;

import org.hyf.inspur.LessonDesin.clear.tools.TProperties;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

public class HighUserMapper extends Mapper<LongWritable, Text,Text, IntWritable>{
    protected void map(LongWritable key, Text value,
                       Mapper<LongWritable, Text, Text, IntWritable>.Context context)
            throws IOException, InterruptedException {
        //String str[] = values.toString().split("|");
        String temp[]=value.toString().split(TProperties.getValue("fileoutsplit"));
        String wordNum=temp[2] + "|" + temp[0] + "|" + temp[1];
        int num=1;
        System.out.println(wordNum+"---"+num);
        context.write(new Text(wordNum),new IntWritable(num));
    }
}
